#Project settings
PROJECT = fptest
LIB = -lfixmath -lm
SRC = .
INC = -I/home/martinme/Develop/workspace/library/libfixmath -L/home/martinme/Develop/workspace/library/libfixmath

#Compiler settings
CPP = gcc
CC = gcc
AS = gcc
LD = gcc
AR = ar
#CC_FLAGS  = -O2 $(INC) -Wall -Wextra -c -DFIXMATH_FAST_SIN -DFIXMATH_NO_CACHE -DFIXMATH_SIN_LUT
#CC_FLAGS  = -O2 $(INC) -Wall -Wextra -DFIXMATH_FAST_SIN -DFIXMATH_NO_CACHE -DFIXMATH_OPTIMIZE_8BIT -DFIXMATH_NO_OVERFLOW 
CC_FLAGS  = -g3 $(INC) -Wall -Wextra -DFIXMATH_FAST_SIN -DFIXMATH_NO_CACHE -DFIXMATH_OPTIMIZE_8BIT -DFIXMATH_NO_OVERFLOW
# Find all source files
SRC_C   = fixpoint.c
HEADERS = $(foreach dir, $(SRC), $(wildcard $(dir)/*.h))

# Compile rules.
.PHONY : all
all: $(PROJECT)

show:
	@echo ${SRC_C}

tags:
	ctags ${SRC_C} ${HEADERS}

$(PROJECT): $(SRC_C)
	$(CC) $(CC_FLAGS) $(SRC_C) $(LIB) -o $(PROJECT)


# Clean rules
.PHONY : clean
clean:
	rm -f $(PROJECT) $(OBJ)
